home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c,comp.std.c
- Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
- Date: 27 Jan 1996 12:22:26 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4edqh2$rvl@solutions.solon.com>
- References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM> <KANZE.96Jan26164833@gabi.gabi-soft.fr> <DLtABq.Fzu@mv.mv.com>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <DLtABq.Fzu@mv.mv.com>, Michael Furman <ENGR@GSSI.MV.COM> wrote:
- [Re a rule forbidding extensions.]
-
- >My question was: is such rule exists?
-
- Sort of.
-
- There are two kinds of things called "legal" C. One is a strictly
- conforming program, which must be accepted by, and work on, *any*
- conforming C compiler. The other is merely a conforming
- program, which must be accepted by, and work on, *at least one*
- conforming compiler. The latter class is meaningless; FORTRAN is
- conforming C. (gcc with g77 compiles it. Technically, gcc is not
- quite conforming, but nothing is.)
-
- For purposes of the C newsgroups, discussion of what is/isn't legal
- is generally restricted to strictly conforming C. Any extension
- used allows a compiler to reject code. For instance, a compiler
- is *allowed* to reject
- int main(int ac, char *av[], char *ep[]) {
- return 0;
- }
- so we say it is "not legal C". A compiler *MUST* accept
- int main(int far, char *near[]) {
- int asm;
- asm = !!far;
- return asm;
- }
- and its return status is defined. If a compiler were to reject it because,
- for instance, asm, far, and near are used as variables, it would not be
- a legal implementation.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1995 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- Using trn? Weird new newsgroup problem? I know the fix! Email me!
- The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq - Not A Flying Toy
-